﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WpfSnqkGasAnalysis.Model
{

    /// <summary>
    /// 分页数据
    /// </summary>
    /// <typeparam name="T"></typeparam>
    /// <remarks>
    /// 2022-1-4 16:15:55 王浩力 添加
    /// </remarks>
    public class PageModel<T>
    {
        /// <summary>
        /// 当前页码
        /// </summary>
        public int PageIndex { get; set; }

        /// <summary>
        /// 页大小
        /// </summary>
        public int PageSize { get; set; }

        /// <summary>
        /// 总记录数
        /// </summary>
        public int Total { get; set; }

        /// <summary>
        /// 当前页数据列表
        /// </summary>
        public List<T> List { get; set; }

        public PageModel()
        {

        }

        public PageModel(List<T> items, int total, int pageIndex, int pageSize)
        {
            PageIndex = pageIndex;
            PageSize = pageSize;
            Total = total;
            List = items;
        }
    }
}
